package com.netdisk.dto.request.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 注册数据传输对象
 */
@Data
@ApiModel(value = "注册DTO", description = "注册数据传输对象")
public class RegisterDTO {

    @NotBlank(message = "用户名不能为空")
    @Size(min = 3, max = 20, message = "用户名长度应为3-20个字符")
    @ApiModelProperty(value = "用户名", required = true)
    private String username;

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度应为6-20个字符")
    @ApiModelProperty(value = "密码", required = true)
    private String password;

    @NotBlank(message = "确认密码不能为空")
    @ApiModelProperty(value = "确认密码", required = true)
    private String confirmPassword;

    @NotBlank(message = "电子邮箱不能为空")
    @Email(message = "请输入有效的电子邮箱")
    @ApiModelProperty(value = "电子邮箱", required = true)
    private String email;
} 